<template>
  <swiper class="swiper-style">
    <swiper-item v-for="item in banners" :key="item.title">
      <a :href="item.link">
        <img :src="item.image" @load="imgload" />
      </a>
    </swiper-item>
  </swiper>
</template>

<script>
import { Swiper, SwiperItem } from "common/swiper";
export default {
  name: "Banner",
  components: {
    Swiper,
    SwiperItem,
  },
  props: {
    banners: {
      type: Array,
      default: {},
    },
  },
  data(){
    return{
      isload:false
    }
  },
  mounted() {},
  methods: {
    imgload(){
      if (!this.isload) {
        this.$emit('imgload')
        this.isload = true
      }
      
    }
  },
};
</script>

<style lang="css" scoped>
</style>